stages:
  - Scan codebase

Security Scanning DotNet:
  stage: Scan codebase
  image: $HUB_CLI_IMAGE
  variables:
    HUB_CLI_IMAGE: "dockerhub.mos.ru/crp9e4t3mejo9pcpk6le/hub-cli:2023.1-gitlab"
    CODEBASE_BUILD_TOOL: nuget
  tags:
    - am-runner
  script:
    - cd /opt/scan
    - python3 -m src.scan_codebase --url ${APPSECHUB_URL} --token ${APPSECHUB_TOKEN} --scan-initiator ${GITLAB_USER_EMAIL} --appcode ${CODE_PROJECT_NAME} --codebase "${CI_PROJECT_URL}.git;${CI_COMMIT_REF_NAME};${CI_COMMIT_SHA};/;" --codebase-build-tool ${CODEBASE_BUILD_TOOL} --comment "${APPSECBOT_API_KEY}"